﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace uam_fps_game.Gfx
{
    public class VisualObject
    {
        protected Matrix _worldMatrix;
        public Matrix WorldMatrix
        {
            get { return _worldMatrix; }
            set { _worldMatrix = value; }
        }

        public bool Visible { get; set; }

        protected BoundingSphere _worldSpaceBoundingSphere;
        internal BoundingSphere WorldSpaceBoundingSphere
        {
            get { return _worldSpaceBoundingSphere; }
            set { _worldSpaceBoundingSphere = value; }
        }

        protected BoundingSphere _objectSpaceBoundingSphere;

        
        public VisualObject()
        {
            Visible = true;
        }

        internal void UpdateBoundingSphere()
        {
            _objectSpaceBoundingSphere.Transform(ref _worldMatrix, out _worldSpaceBoundingSphere);
        }
    }
}
